#ifndef _csReferencedObject_h_
#define _csReferencedObject_h_

/********************************************************************
	created:	2009/11/05
	created:	5:11:2009   14:03
	filename: 	e:\csEngine\csCoreLib\src\common\csReferencedObject.h
	file path:	e:\csEngine\csCoreLib\src\common
	file base:	csReferencedObject
	file ext:	h
	author:		dongchengok
	
	purpose:	referenced object base class
*********************************************************************/
#include "../csType.h"
#include "../threading/csSafeCounter.h"
//------------------------------------------------------------------------
class csReferencedObject
{
public:
	csReferencedObject();
	virtual ~csReferencedObject();

	void	addReference();
	void	releaseReference();

	s32		getReferencedCount() const;

private:
	csSafeCounter	m_counter;
};

#include "../common/csReferencedObject.inl"
#endif // _csReferencedObject_h_
